
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->

<head>


<meta charset="utf-8">
<meta http-equiv="cleartype" content="on">

<title>Install Sqoop on Local - Sam小龙</title>
<meta name="author" content="xiaolong.yuanxl">




<meta name="description" content="单机安装sqoop用于学习">

<meta name="keywords" content="sqoop ">


<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Twitter Cards -->


<!-- Open Graph -->
<meta property="og:local" content="en_US">
<meta property="og:type" content="article">
<meta property="og:url" content="http://yuanxiaolong.github.io/blog/2014/08/17/install-sqoop-on-local">
<meta property="og:title" content="install sqoop on local">
<meta property="og:description" content="单机安装sqoop用于学习">

  <meta property="og:image" content="">

<meta property="og:site_name" content="Sam小龙">

<link rel="canonical" href="http://yuanxiaolong.github.io/blog/2014/08/17/install-sqoop-on-local">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<!-- <link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet"> -->
<link href="/stylesheets/font-awesome.min.css" rel="stylesheet">
<link href="/atom.xml" rel="alternate" title="Sam小龙" type="application/atom+xml">

<!-- the flow button on left -->
<script src="/javascripts/vendor/modernizr-2.6.2.custom.min.js"></script>


  <style type="text/css">body {background-image:url(/images/bg.jpg);background-size:cover;}</style>

<!-- 
  

  
    
  

  <style type="text/css">body {background-image:url(
      /images/
    
      bg.jpg
    
  
    );}</style>
 -->

<!--Fonts from Google"s Web font directory at http://google.com/webfonts
<link href="//fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
-->


</head>

<body id="post" >

<!--[if lt IE 9]><div class="upgrade"><strong><a href="http://whatbrowser.org/">Your browser is quite old!</strong> Why not upgrade to a different browser to better enjoy this site?</a></div><![endif]-->
<nav id="dl-menu" class="dl-menuwrapper" role="navigation">
	<button class="dl-trigger">Open Menu</button>
	<ul class="dl-menu">
		<li><a href="/">主页</a></li>

		<li>
			<a href="#">内容</a>
			<ul class="dl-submenu">
				<li><a href="/posts/">文章列表</a></li>
				<li><a href="/categories/">分类列表</a></li>
			</ul>
		</li>

		<li>
			<a href="#">关于</a>
			<ul class="dl-submenu">
				<li>
					<img src="/images/avatar.png" alt="xiaolong.yuanxl photo" class="author-photo">
					<h4>xiaolong.yuanxl</h4>
					<p></p>
				</li>
				<li><a href="/about">关于我</a></li>
				<li>
					<a href="mailto:232351936@qq.com"><i class="fa fa-envelope"></i> Email</a>
				</li>
				
				
				<li>
					<a href="http://github.com/yuanxiaolong"><i class="fa fa-github"></i> GitHub</a>
				</li>
			</ul><!-- /.dl-submenu -->
		</li>

		
	</ul><!-- /.dl-menu -->
</nav><!-- /.dl-menuwrapper -->




<div id="main" role="main" >
  <article class="hentry">
    <header class="header-title">
      <div class="header-title-wrap">
        
          <h1 class="entry-title"><a href="/blog/2014/08/17/install-sqoop-on-local/" rel="bookmark" title="install sqoop on local">install sqoop on local</a></h1>
        
        <h2>August 17, 2014</h2>
      </div><!-- /.header-title-wrap -->
    </header>
    <div class="entry-content">
      <p>介绍一下单机安装sqoop的过程</p>

<!--more-->
<p>sqoop（sql to hadoop），用于数据交换。即可以从关系型DB如mysql，导入到hdfs、hive、hbase。当然也有导出功能。</p>

<font color="#7c837f">（本文只示例导入hdfs、hbase，导出等只是参数不同而已）</font>
<hr />

<h2 id="section">环境准备</h2>

<ul>
  <li>hadoop（1.2.1）</li>
  <li>hive （0.13.1）</li>
  <li>hbase （0.98.4-hadoop1）</li>
  <li>mysql （5.6.16）</li>
</ul>

<font color="#7c837f">注：括号里的是我本机的实验环境，并非必要条件</font>

<hr />

<h2 id="section-1">安装过程</h2>

<p>1.下载sqoop，可以在<a href="http://sqoop.apache.org/" target="_blank"><font color="#6868b4">这里下载</font></a></p>

<p>2.解压sqoop，并修改配置。</p>

<p>先执行如下命令，创建配置文件</p>

<div class="bogus-wrapper"><notextile><figure class="code"><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
</pre></td><td class="code"><pre><code class=""><span class="line">xiaolongyuan@xiaolongdeMacBook-Air conf$ pwd
</span><span class="line">/Users/xiaolongyuan/Documents/sqoop-1.4.4/conf
</span><span class="line">xiaolongyuan@xiaolongdeMacBook-Air conf$ cp sqoop-env-template.sh   sqoop-env.sh</span></code></pre></td></tr></table></div></figure></notextile></div>

<p>再编辑配置文件<font color="#7c837f">(最下面zookeeper配置，我们选择hbase的默认自带管理)</font></p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span>sqoop-env.sh</span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
<span class="line-number">5</span>
<span class="line-number">6</span>
<span class="line-number">7</span>
<span class="line-number">8</span>
<span class="line-number">9</span>
<span class="line-number">10</span>
<span class="line-number">11</span>
<span class="line-number">12</span>
<span class="line-number">13</span>
<span class="line-number">14</span>
</pre></td><td class="code"><pre><code class="bash"><span class="line"><span class="c">#Set path to where bin/hadoop is available</span>
</span><span class="line"><span class="nb">export </span><span class="nv">HADOOP_COMMON_HOME</span><span class="o">=</span>/Users/xiaolongyuan/Documents/hadoop-1.2.1
</span><span class="line">
</span><span class="line"><span class="c">#Set path to where hadoop-*-core.jar is available</span>
</span><span class="line"><span class="nb">export </span><span class="nv">HADOOP_MAPRED_HOME</span><span class="o">=</span>/Users/xiaolongyuan/Documents/hadoop-1.2.1
</span><span class="line">
</span><span class="line"><span class="c">#set the path to where bin/hbase is available</span>
</span><span class="line"><span class="nb">export </span><span class="nv">HBASE_HOME</span><span class="o">=</span>/Users/xiaolongyuan/Documents/hbase-0.98.4-hadoop1
</span><span class="line">
</span><span class="line"><span class="c">#Set the path to where bin/hive is available</span>
</span><span class="line"><span class="nb">export </span><span class="nv">HIVE_HOME</span><span class="o">=</span>/Users/xiaolongyuan/Documents/hive-0.13.1
</span><span class="line">
</span><span class="line"><span class="c">#Set the path for where zookeper config dir is</span>
</span><span class="line"><span class="nb">export </span><span class="nv">ZOOCFGDIR</span><span class="o">=</span>/Users/xiaolongyuan/Documents/hbase-0.98.4-hadoop1/lib
</span></code></pre></td></tr></table></div></figure></notextile></div>

<p>修改配置 <font color="green"> bin/configure-sqoop </font>，注释掉有关 HCAT_HOME 的shell脚本，如果安装了HCatalog，则不需要注释</p>

<p>如下：</p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span>configure-sqoop</span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
<span class="line-number">5</span>
<span class="line-number">6</span>
<span class="line-number">7</span>
<span class="line-number">8</span>
<span class="line-number">9</span>
<span class="line-number">10</span>
<span class="line-number">11</span>
<span class="line-number">12</span>
<span class="line-number">13</span>
<span class="line-number">14</span>
<span class="line-number">15</span>
<span class="line-number">16</span>
<span class="line-number">17</span>
<span class="line-number">18</span>
</pre></td><td class="code"><pre><code class="bash"><span class="line"><span class="c">#if [ -z &quot;${HCAT_HOME}&quot; ]; then</span>
</span><span class="line"><span class="c">#  HCAT_HOME=/usr/lib/hcatalog</span>
</span><span class="line"><span class="c">#fi</span>
</span><span class="line">
</span><span class="line"><span class="c">## Moved to be a runtime check in sqoop.</span>
</span><span class="line"><span class="c">#if [ ! -d &quot;${HCAT_HOME}&quot; ]; then</span>
</span><span class="line"><span class="c">#  echo &quot;Warning: $HCAT_HOME does not exist! HCatalog jobs will fail.&quot;</span>
</span><span class="line"><span class="c">#  echo &#39;Please set $HCAT_HOME to the root of your HCatalog installation.&#39;</span>
</span><span class="line"><span class="c">#fi</span>
</span><span class="line">
</span><span class="line"><span class="c"># Add HCatalog to dependency list</span>
</span><span class="line"><span class="c">#if [ -e &quot;${HCAT_HOME}/bin/hcat&quot; ]; then</span>
</span><span class="line"><span class="c">#  TMP_SQOOP_CLASSPATH=${SQOOP_CLASSPATH}:`${HCAT_HOME}/bin/hcat -classpath`</span>
</span><span class="line"><span class="c">#  if [ -z &quot;${HIVE_CONF_DIR}&quot; ]; then</span>
</span><span class="line"><span class="c">#    TMP_SQOOP_CLASSPATH=${TMP_SQOOP_CLASSPATH}:${HIVE_CONF_DIR}</span>
</span><span class="line"><span class="c">#  fi</span>
</span><span class="line"><span class="c">#  SQOOP_CLASSPATH=${TMP_SQOOP_CLASSPATH}</span>
</span><span class="line"><span class="c">#fi</span>
</span></code></pre></td></tr></table></div></figure></notextile></div>

<p>3.添加需要数据交换的数据源驱动，例如数据源是mysql的话，需要添加 <a href="http://yun.baidu.com/share/link?shareid=903445453&amp;uk=3826203270" target="_blank"><font color="#6868b4">mysql-connector-java-5.1.25-bin.jar</font></a>
到sqoop的lib下</p>

<hr />

<h2 id="section-2">运行</h2>

<p>1.先启动hadoop</p>

<p>2.如果需要将mysql的数据导入到hive、hbase里的话，则需要启动hive hbase</p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
</pre></td><td class="code"><pre><code class="bash"><span class="line">xiaolongyuan@xiaolongdeMacBook-Air flume-1.5.0<span class="nv">$ </span>sqoop
</span><span class="line">Warning: <span class="nv">$HADOOP_HOME</span> is deprecated.
</span><span class="line">
</span><span class="line">Try <span class="s1">&#39;sqoop help&#39;</span> <span class="k">for </span>usage.
</span></code></pre></td></tr></table></div></figure></notextile></div>

<p>3.在mysql里对需要使用的用户授权，使其可以从任意主机上访问mysql</p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
</pre></td><td class="code"><pre><code class="bash"><span class="line">mysql&gt; grant all privileges on *.* to <span class="s1">&#39;hadoop&#39;</span>@<span class="s1">&#39;%&#39;</span> identified by <span class="s1">&#39;hadoop&#39;</span> with grant option<span class="p">;</span>
</span><span class="line">Query OK, 0 rows affected <span class="o">(</span>0.00 sec<span class="o">)</span>
</span></code></pre></td></tr></table></div></figure></notextile></div>

<p>4.mysql上此时有数据如下：
<img src="/images/sqoop/20140817/mysql.png" alt="mysql" /></p>

<hr />

<font color="#8a345d" size="5"> mysql &#8211;&gt; sqoop &#8211;&gt; hdfs </font>

<p>1.运行如下命令</p>

<p>-m 1 表示 限制map的数量是1个，由于我们是单机且数量少，所以用此。</p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
</pre></td><td class="code"><pre><code class="bash"><span class="line">sqoop import --connect jdbc:mysql://127.0.0.1:3306/test --username hadoop --password hadoop --table student -m 1
</span></code></pre></td></tr></table></div></figure></notextile></div>

<p>2.在hdfs里查看</p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
<span class="line-number">5</span>
<span class="line-number">6</span>
<span class="line-number">7</span>
<span class="line-number">8</span>
<span class="line-number">9</span>
<span class="line-number">10</span>
<span class="line-number">11</span>
<span class="line-number">12</span>
<span class="line-number">13</span>
<span class="line-number">14</span>
<span class="line-number">15</span>
<span class="line-number">16</span>
<span class="line-number">17</span>
<span class="line-number">18</span>
</pre></td><td class="code"><pre><code class="bash"><span class="line">xiaolongyuan@xiaolongdeMacBook-Air bin<span class="nv">$ </span>hadoop dfs -ls
</span><span class="line">Warning: <span class="nv">$HADOOP_HOME</span> is deprecated.
</span><span class="line">Found 3 items
</span><span class="line">drwxr-xr-x   - xiaolongyuan supergroup          0 2014-06-29 23:02 /user/xiaolongyuan/in
</span><span class="line">drwxr-xr-x   - xiaolongyuan supergroup          0 2014-06-08 14:47 /user/xiaolongyuan/out
</span><span class="line">drwxr-xr-x   - xiaolongyuan supergroup          0 2014-08-17 12:19 /user/xiaolongyuan/student
</span><span class="line">
</span><span class="line">xiaolongyuan@xiaolongdeMacBook-Air bin<span class="nv">$ </span>hadoop dfs -ls student/
</span><span class="line">Warning: <span class="nv">$HADOOP_HOME</span> is deprecated.
</span><span class="line">Found 3 items
</span><span class="line">-rw-r--r--   1 xiaolongyuan supergroup          0 2014-08-17 12:19 /user/xiaolongyuan/student/_SUCCESS
</span><span class="line">drwxr-xr-x   - xiaolongyuan supergroup          0 2014-08-17 12:19 /user/xiaolongyuan/student/_logs
</span><span class="line">-rw-r--r--   1 xiaolongyuan supergroup         34 2014-08-17 12:19 /user/xiaolongyuan/student/part-m-00000
</span><span class="line">
</span><span class="line">xiaolongyuan@xiaolongdeMacBook-Air bin<span class="nv">$ </span>hadoop dfs -cat student/part-m-00000
</span><span class="line">Warning: <span class="nv">$HADOOP_HOME</span> is deprecated.
</span><span class="line">1,tom,12,class1
</span><span class="line">2,kitty,16,class2
</span></code></pre></td></tr></table></div></figure></notextile></div>

<hr />

<font color="#8a345d" size="5"> mysql &#8211;&gt; sqoop &#8211;&gt; hive </font>

<p>1.先创建hive数据库</p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
<span class="line-number">5</span>
<span class="line-number">6</span>
</pre></td><td class="code"><pre><code class="bash"><span class="line">xiaolongyuan@xiaolongdeMacBook-Air flume-1.5.0<span class="nv">$ </span>hive
</span><span class="line">
</span><span class="line">Logging initialized using configuration in jar:file:/Users/xiaolongyuan/Documents/hive-0.13.1/lib/hive-common-0.13.1.jar!/hive-log4j.properties
</span><span class="line">hive <span class="o">(</span>default<span class="o">)</span>&gt; create database <span class="nb">test</span><span class="p">;</span>
</span><span class="line">OK
</span><span class="line">Time taken: 0.765 seconds
</span></code></pre></td></tr></table></div></figure></notextile></div>

<p>2.执行 <font color="#7e986c">（如果hdfs下有之前导入过的student目录，需要先删除，否则会报文件夹已存在的错误）</font></p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
</pre></td><td class="code"><pre><code class="bash"><span class="line">sqoop import --connect jdbc:mysql://127.0.0.1:3306/test --username hadoop --password hadoop --table student --hive-import --hive-database <span class="nb">test</span> --hive-delims-replacement <span class="s1">&#39;\t&#39;</span> -m 1
</span></code></pre></td></tr></table></div></figure></notextile></div>

<p>3.查看hive里的数据<font color="#7c837f"> (我配置了hive显示表头，database_name和tab_name都是表头，不是数据) </font></p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
<span class="line-number">5</span>
<span class="line-number">6</span>
<span class="line-number">7</span>
<span class="line-number">8</span>
<span class="line-number">9</span>
<span class="line-number">10</span>
<span class="line-number">11</span>
<span class="line-number">12</span>
<span class="line-number">13</span>
<span class="line-number">14</span>
<span class="line-number">15</span>
<span class="line-number">16</span>
<span class="line-number">17</span>
<span class="line-number">18</span>
<span class="line-number">19</span>
<span class="line-number">20</span>
<span class="line-number">21</span>
<span class="line-number">22</span>
<span class="line-number">23</span>
<span class="line-number">24</span>
<span class="line-number">25</span>
<span class="line-number">26</span>
<span class="line-number">27</span>
</pre></td><td class="code"><pre><code class="bash"><span class="line">xiaolongyuan@xiaolongdeMacBook-Air hive-0.13.1<span class="nv">$ </span>hive
</span><span class="line">
</span><span class="line">Logging initialized using configuration in jar:file:/Users/xiaolongyuan/Documents/hive-0.13.1/lib/hive-common-0.13.1.jar!/hive-log4j.properties
</span><span class="line">
</span><span class="line">hive <span class="o">(</span>default<span class="o">)</span>&gt; show databases<span class="p">;</span>
</span><span class="line">OK
</span><span class="line">database_name
</span><span class="line">default
</span><span class="line"><span class="nb">test</span>
</span><span class="line">Time taken: 0.736 seconds, Fetched: 2 row<span class="o">(</span>s<span class="o">)</span>
</span><span class="line">
</span><span class="line">hive <span class="o">(</span>default<span class="o">)</span>&gt; use <span class="nb">test</span><span class="p">;</span>
</span><span class="line">OK
</span><span class="line">Time taken: 0.037 seconds
</span><span class="line">
</span><span class="line">hive <span class="o">(</span><span class="nb">test</span><span class="o">)</span>&gt; show tables<span class="p">;</span>
</span><span class="line">OK
</span><span class="line">tab_name
</span><span class="line">student
</span><span class="line">Time taken: 0.039 seconds, Fetched: 1 row<span class="o">(</span>s<span class="o">)</span>
</span><span class="line">
</span><span class="line">hive <span class="o">(</span><span class="nb">test</span><span class="o">)</span>&gt; <span class="k">select</span> * from student<span class="p">;</span>
</span><span class="line">OK
</span><span class="line">student.s_no	student.s_name	student.s_age	student.s_class
</span><span class="line">1	tom	12	class1
</span><span class="line">2	kitty	16	class2
</span><span class="line">Time taken: 0.508 seconds, Fetched: 2 row<span class="o">(</span>s<span class="o">)</span>
</span></code></pre></td></tr></table></div></figure></notextile></div>

<hr />

<font color="#8a345d" size="5"> mysql &#8211;&gt; sqoop &#8211;&gt; hbase </font>

<p>1.执行命令，导入数据到hbase</p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
</pre></td><td class="code"><pre><code class="bash"><span class="line">sqoop import --connect jdbc:mysql://127.0.0.1:3306/test --username hadoop --password hadoop --table student --hbase-create-table --hbase-table student --column-family s_info --hbase-row-key s_no -m 1
</span></code></pre></td></tr></table></div></figure></notextile></div>

<p>2.查看数据</p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
<span class="line-number">5</span>
<span class="line-number">6</span>
<span class="line-number">7</span>
<span class="line-number">8</span>
<span class="line-number">9</span>
<span class="line-number">10</span>
<span class="line-number">11</span>
<span class="line-number">12</span>
<span class="line-number">13</span>
<span class="line-number">14</span>
<span class="line-number">15</span>
<span class="line-number">16</span>
<span class="line-number">17</span>
<span class="line-number">18</span>
<span class="line-number">19</span>
<span class="line-number">20</span>
<span class="line-number">21</span>
<span class="line-number">22</span>
<span class="line-number">23</span>
<span class="line-number">24</span>
<span class="line-number">25</span>
<span class="line-number">26</span>
<span class="line-number">27</span>
<span class="line-number">28</span>
<span class="line-number">29</span>
<span class="line-number">30</span>
<span class="line-number">31</span>
<span class="line-number">32</span>
<span class="line-number">33</span>
<span class="line-number">34</span>
<span class="line-number">35</span>
<span class="line-number">36</span>
<span class="line-number">37</span>
</pre></td><td class="code"><pre><code class="bash"><span class="line">xiaolongyuan@xiaolongdeMacBook-Air bin<span class="nv">$ </span>start-hbase.sh
</span><span class="line">localhost: starting zookeeper, logging to /Users/xiaolongyuan/Documents/hbase-0.98.4-hadoop1/bin/../logs/hbase-xiaolongyuan-zookeeper-xiaolongdeMacBook-Air.local.out
</span><span class="line">starting master, logging to /Users/xiaolongyuan/Documents/hbase-0.98.4-hadoop1//logs/hbase-xiaolongyuan-master-xiaolongdeMacBook-Air.local.out
</span><span class="line">localhost: starting regionserver, logging to /Users/xiaolongyuan/Documents/hbase-0.98.4-hadoop1/bin/../logs/hbase-xiaolongyuan-regionserver-xiaolongdeMacBook-Air.local.out
</span><span class="line">
</span><span class="line">xiaolongyuan@xiaolongdeMacBook-Air bin<span class="nv">$ </span>jps
</span><span class="line">81678 Jps
</span><span class="line">79845 TaskTracker
</span><span class="line">79673 SecondaryNameNode
</span><span class="line">81534 HMaster
</span><span class="line">79746 JobTracker
</span><span class="line">79573 DataNode
</span><span class="line">81488 HQuorumPeer
</span><span class="line">79474 NameNode
</span><span class="line">81645 HRegionServer
</span><span class="line">
</span><span class="line">xiaolongyuan@xiaolongdeMacBook-Air bin<span class="nv">$ </span>hbase shell
</span><span class="line">HBase Shell<span class="p">;</span> enter <span class="s1">&#39;help&lt;RETURN&gt;&#39;</span> <span class="k">for </span>list of supported commands.
</span><span class="line">Type <span class="s2">&quot;exit&lt;RETURN&gt;&quot;</span> to leave the HBase Shell
</span><span class="line">Version 0.98.4-hadoop1, r890e852ce1c51b71ad180f626b71a2a1009246da, Mon Jul 14 18:54:31 PDT 2014
</span><span class="line">
</span><span class="line">hbase<span class="o">(</span>main<span class="o">)</span>:001:0&gt; scan <span class="s1">&#39;student&#39;</span>
</span><span class="line">2014-08-17 20:21:36.166 java<span class="o">[</span>81679:1903<span class="o">]</span> Unable to load realm info from SCDynamicStore
</span><span class="line">SLF4J: Class path contains multiple SLF4J bindings.
</span><span class="line">SLF4J: Found binding in <span class="o">[</span>jar:file:/Users/xiaolongyuan/Documents/hbase-0.98.4-hadoop1/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class<span class="o">]</span>
</span><span class="line">SLF4J: Found binding in <span class="o">[</span>jar:file:/Users/xiaolongyuan/Documents/hadoop-1.2.1/lib/slf4j-log4j12-1.4.3.jar!/org/slf4j/impl/StaticLoggerBinder.class<span class="o">]</span>
</span><span class="line">SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings <span class="k">for </span>an explanation.
</span><span class="line">ROW                                                  COLUMN+CELL
</span><span class="line"> 1                                                   <span class="nv">column</span><span class="o">=</span>s_info:s_age, <span class="nv">timestamp</span><span class="o">=</span>1408250793626, <span class="nv">value</span><span class="o">=</span>12
</span><span class="line"> 1                                                   <span class="nv">column</span><span class="o">=</span>s_info:s_class, <span class="nv">timestamp</span><span class="o">=</span>1408250793626, <span class="nv">value</span><span class="o">=</span>class1
</span><span class="line"> 1                                                   <span class="nv">column</span><span class="o">=</span>s_info:s_name, <span class="nv">timestamp</span><span class="o">=</span>1408250793626, <span class="nv">value</span><span class="o">=</span>tom
</span><span class="line"> 2                                                   <span class="nv">column</span><span class="o">=</span>s_info:s_age, <span class="nv">timestamp</span><span class="o">=</span>1408250793626, <span class="nv">value</span><span class="o">=</span>16
</span><span class="line"> 2                                                   <span class="nv">column</span><span class="o">=</span>s_info:s_class, <span class="nv">timestamp</span><span class="o">=</span>1408250793626, <span class="nv">value</span><span class="o">=</span>class2
</span><span class="line"> 2                                                   <span class="nv">column</span><span class="o">=</span>s_info:s_name, <span class="nv">timestamp</span><span class="o">=</span>1408250793626, <span class="nv">value</span><span class="o">=</span>kitty
</span><span class="line">2 row<span class="o">(</span>s<span class="o">)</span> in 0.3350 seconds
</span><span class="line">
</span><span class="line">hbase<span class="o">(</span>main<span class="o">)</span>:002:0&gt;
</span></code></pre></td></tr></table></div></figure></notextile></div>


      <!-- add copyright for each post -->
      <div style="margin-top:20px;">
        <font color="gray" size="3">
          原文地址，转载请注明出处:<br/>
          <a href="http://blog.yuanxiaolong.cn/blog/2014/08/17/install-sqoop-on-local/">http://blog.yuanxiaolong.cn/blog/2014/08/17/install-sqoop-on-local/</a>
        </font>
      </div>
      <footer class="entry-meta">
        <span class="entry-tags"><a href="/categories/#sqoop" title="Pages tagged sqoop" class="tag">sqoop</a></span>
        <span><a href="/blog/2014/08/17/install-sqoop-on-local/" rel="bookmark" title="install sqoop on local">install sqoop on local</a> was published on <span class="entry-date date published updated"><time datetime="2014-08-17T17:15:58+08:00">August 17, 2014</time></span></span>
        
        <span class="author vcard"><span class="fn"><a href="" title="About xiaolong.yuanxl">xiaolong.yuanxl</a></span></span>
        <div class="social-share">
          <div class="socialcount socialcount-small inline-list">
            <!-- <li class="facebook"><a href="https://www.facebook.com/sharer/sharer.php?u=/blog/2014/08/17/install-sqoop-on-local/" title="Share on Facebook"><span class="count"><i class="fa fa-facebook-square"></i> Like</span></a></li>
            <li class="twitter"><a href="https://twitter.com/intent/tweet?text=/blog/2014/08/17/install-sqoop-on-local/" title="Share on Twitter"><span class="count"><i class="fa fa-twitter-square"></i> Tweet</span></a></li>
            <li class="googleplus"><a href="https://plus.google.com/share?url=/blog/2014/08/17/install-sqoop-on-local/" title="Share on Google Plus"><span class="count"><i class="fa fa-google-plus-square"></i> +1</span></a></li> -->
            <!-- 多说评论框 start -->
          	<div class="ds-thread" data-thread-key="/blog/2014/08/17/install-sqoop-on-local/" data-title="install sqoop on local" data-url="http://blog.yuanxiaolong.cn/blog/2014/08/17/install-sqoop-on-local/"></div>
            <!-- 多说评论框 end -->
            <!-- 多说公共JS代码 start (一个网页只需插入一次) -->
            <script type="text/javascript">
            var duoshuoQuery = {short_name:"yuanxiaolong"};
            	(function() {
            		var ds = document.createElement('script');
            		ds.type = 'text/javascript';ds.async = true;
            		ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
            		ds.charset = 'UTF-8';
            		(document.getElementsByTagName('head')[0]
            		 || document.getElementsByTagName('body')[0]).appendChild(ds);
            	})();
            	</script>
            <!-- 多说公共JS代码 end -->
        </div>
        </div><!-- /.social-share -->
      </footer>

    </div><!-- /.entry-content -->
    
      <div class="read-more">
        
          <div class="read-more-header">
            <a href="/blog/2014/09/07/install-nfs-and-share-file/" class="btn">Read More</a>
          </div><!-- /.read-more-header -->
          <div class="read-more-content">
            <h3><a href="/blog/2014/09/07/install-nfs-and-share-file/" title="install nfs and shshare file">install nfs and shshare file</a></h3>
            <p>安装nfs服务器，用于共享配置 <a href="/blog/2014/09/07/install-nfs-and-share-file/"> Continue reading</a></p>
          </div><!-- /.read-more-content -->
        
        <div class="read-more-list">
          
            <div class="list-item">
              <h4><a href="/blog/2014/09/07/install-dns-server-bind/" title="install dns server bind">install dns server bind</a></h4>
              <span>Published on September 07, 2014</span>
            </div><!-- /.list-item -->
          
            <div class="list-item">
              <h4><a href="/blog/2014/08/31/analysis-hadoop-load-configuration/" title="analysis hadoop load configuration">analysis hadoop load configuration</a></h4>
              <span>Published on August 31, 2014</span>
            </div><!-- /.list-item -->
          
        </div><!-- /.read-more-list -->
      </div><!-- /.read-more -->
    
    
  </article>
</div><!-- /#main -->

<div class="footer-wrapper">
  <footer role="contentinfo">
    <span>&copy; 2014 xiaolong.yuanxl. Powered by <a href="http://octopress.org">Octopress</a> using the <a href="https://github.com/Z1MM32M4N/hpstr-theme/">HPSTR Theme for Octopress</a>.</span>

  </footer>
</div><!-- /.footer-wrapper -->



<script src="http://cdn.staticfile.org/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/javascripts/vendor/jquery-1.9.1.min.js"><\/script>')</script>
<!--
<script src="/javascripts/octopress.js" type="text/javascript"></script>
-->
<script src="/javascripts/scripts.min.js"></script>
<!-- 
 -->
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=35560703" charset="UTF-8"></script>






</body>
</html>
